package com.zjy.entity;

public class Student {
//学生有：姓名，年龄，一个任课老师。
    private String sName;
    private int age;
    private Teacher teacher;

    @Override
    public String toString() {
        return "Student{" +
                "sName='" + sName + '\'' +
                ", age=" + age +
                ", teacher='" + teacher + '\'' +
                '}';
    }

    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    public Student() {
    }

    public Student(String sName, int age, Teacher teacher) {
        this.sName = sName;
        this.age = age;
        this.teacher = teacher;
    }
}
